<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSD1306 OLED display driver: AdafruitCanvasOps&lt; BPP &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SSD1306 OLED display driver
   &#160;<span id="projectnumber">1.8.2</span>
   </div>
   <div id="projectbrief">This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_adafruit_canvas_ops-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">AdafruitCanvasOps&lt; BPP &gt; Class Template Reference<div class="ingroups"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html">NANO_ENGINE: Nano Engine description</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="adafruit_8h_source.html">adafruit.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for AdafruitCanvasOps&lt; BPP &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_adafruit_canvas_ops.png" usemap="#AdafruitCanvasOps_3C_20BPP_20_3E_map" alt=""/>
  <map id="AdafruitCanvasOps_3C_20BPP_20_3E_map" name="AdafruitCanvasOps_3C_20BPP_20_3E_map">
<area href="class_adafruit_canvas_base.html" alt="AdafruitCanvasBase&lt; BPP &gt;" shape="rect" coords="0,112,176,136"/>
<area href="class_adafruit_canvas_base.html" alt="AdafruitCanvasBase&lt; 1 &gt;" shape="rect" coords="186,112,362,136"/>
<area href="class_adafruit_canvas_base.html" alt="AdafruitCanvasBase&lt; 16 &gt;" shape="rect" coords="372,112,548,136"/>
<area href="class_adafruit_canvas_base.html" alt="AdafruitCanvasBase&lt; 8 &gt;" shape="rect" coords="558,112,734,136"/>
<area href="class_adafruit_canvas1.html" alt="AdafruitCanvas1" shape="rect" coords="186,168,362,192"/>
<area href="class_adafruit_canvas16.html" alt="AdafruitCanvas16" shape="rect" coords="372,168,548,192"/>
<area href="class_adafruit_canvas8.html" alt="AdafruitCanvas8" shape="rect" coords="558,168,734,192"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a05005ab6548a0d0c548096a1a206e917"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_adafruit_canvas_ops.html#a05005ab6548a0d0c548096a1a206e917">AdafruitCanvasOps</a> (<a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga3de6a212815ee8499f4042db94992210">lcduint_t</a> w, <a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga3de6a212815ee8499f4042db94992210">lcduint_t</a> h, uint8_t *buffer)</td></tr>
<tr class="separator:a05005ab6548a0d0c548096a1a206e917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a231880e68eb391750a64d2f7bbd2237c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_adafruit_canvas_ops.html#a231880e68eb391750a64d2f7bbd2237c">drawPixel</a> (int16_t x, int16_t y, uint16_t color) override</td></tr>
<tr class="separator:a231880e68eb391750a64d2f7bbd2237c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c6e7bba427fbc0e9e3b8e36fcd1b0ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_adafruit_canvas_ops.html#a2c6e7bba427fbc0e9e3b8e36fcd1b0ab">setOffset</a> (<a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga609c6ba2ba635102cd316b7b59af8351">lcdint_t</a> ox, <a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga609c6ba2ba635102cd316b7b59af8351">lcdint_t</a> oy)</td></tr>
<tr class="separator:a2c6e7bba427fbc0e9e3b8e36fcd1b0ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa3bc52732d31517596321f0efa40bafe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga6bed080ec75d21960ecff045b5b110ff">NanoPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_adafruit_canvas_ops.html#aa3bc52732d31517596321f0efa40bafe">offset</a></td></tr>
<tr class="separator:aa3bc52732d31517596321f0efa40bafe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:af62e9d7f0736b51ea8fd3a680ccea70a"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_adafruit_canvas_ops.html#af62e9d7f0736b51ea8fd3a680ccea70a">BITS_PER_PIXEL</a> = BPP</td></tr>
<tr class="separator:af62e9d7f0736b51ea8fd3a680ccea70a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0077cb63601a008150f6d4c7642ab702"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_adafruit_canvas_ops.html#a0077cb63601a008150f6d4c7642ab702">m_buffer</a></td></tr>
<tr class="separator:a0077cb63601a008150f6d4c7642ab702"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;uint8_t BPP&gt;<br />
class AdafruitCanvasOps&lt; BPP &gt;</h3>

<p>This is basic template class for all canvas classes, based on Adafruit_GFX. This base class provides functionality compatible with native <a class="el" href="class_nano_canvas.html">NanoCanvas</a> implementation of ssd1306 library </p>

<p class="definition">Definition at line <a class="el" href="adafruit_8h_source.html#l00071">71</a> of file <a class="el" href="adafruit_8h_source.html">adafruit.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a05005ab6548a0d0c548096a1a206e917"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05005ab6548a0d0c548096a1a206e917">&#9670;&nbsp;</a></span>AdafruitCanvasOps()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t BPP&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps</a>&lt; BPP &gt;::<a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga3de6a212815ee8499f4042db94992210">lcduint_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga3de6a212815ee8499f4042db94992210">lcduint_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Initializes canvas, based on Adafruit GFX. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>width of canvas </td></tr>
    <tr><td class="paramname">h</td><td>height of canvas area </td></tr>
    <tr><td class="paramname">buffer</td><td>buffer to use for pixels</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>the size of buffer must be enough to store (w*h*bpp/8) bytes. </dd></dl>

<p class="definition">Definition at line <a class="el" href="adafruit_8h_source.html#l00088">88</a> of file <a class="el" href="adafruit_8h_source.html">adafruit.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a231880e68eb391750a64d2f7bbd2237c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a231880e68eb391750a64d2f7bbd2237c">&#9670;&nbsp;</a></span>drawPixel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t BPP&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps</a>&lt; BPP &gt;::drawPixel </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>draw single pixel in canvas area</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x position </td></tr>
    <tr><td class="paramname">y</td><td>y position </td></tr>
    <tr><td class="paramname">color</td><td>color of pixel: for monochrome it can be 0 (black), 1 (white), 2 (invert) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2c6e7bba427fbc0e9e3b8e36fcd1b0ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c6e7bba427fbc0e9e3b8e36fcd1b0ab">&#9670;&nbsp;</a></span>setOffset()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t BPP&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps</a>&lt; BPP &gt;::setOffset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga609c6ba2ba635102cd316b7b59af8351">lcdint_t</a>&#160;</td>
          <td class="paramname"><em>ox</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___s_s_d1306___h_a_l___a_p_i.html#ga609c6ba2ba635102cd316b7b59af8351">lcdint_t</a>&#160;</td>
          <td class="paramname"><em>oy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets offset </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ox</td><td>- X offset in pixels </td></tr>
    <tr><td class="paramname">oy</td><td>- Y offset in pixels </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="adafruit_8h_source.html#l00110">110</a> of file <a class="el" href="adafruit_8h_source.html">adafruit.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="af62e9d7f0736b51ea8fd3a680ccea70a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af62e9d7f0736b51ea8fd3a680ccea70a">&#9670;&nbsp;</a></span>BITS_PER_PIXEL</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t BPP&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t <a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps</a>&lt; BPP &gt;::BITS_PER_PIXEL = BPP</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>number of bits per single pixel in buffer </p>

<p class="definition">Definition at line <a class="el" href="adafruit_8h_source.html#l00078">78</a> of file <a class="el" href="adafruit_8h_source.html">adafruit.h</a>.</p>

</div>
</div>
<a id="a0077cb63601a008150f6d4c7642ab702"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0077cb63601a008150f6d4c7642ab702">&#9670;&nbsp;</a></span>m_buffer</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t BPP&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t* <a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps</a>&lt; BPP &gt;::m_buffer</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>pixels buffer </p>

<p class="definition">Definition at line <a class="el" href="adafruit_8h_source.html#l00110">110</a> of file <a class="el" href="adafruit_8h_source.html">adafruit.h</a>.</p>

</div>
</div>
<a id="aa3bc52732d31517596321f0efa40bafe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3bc52732d31517596321f0efa40bafe">&#9670;&nbsp;</a></span>offset</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;uint8_t BPP&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga6bed080ec75d21960ecff045b5b110ff">NanoPoint</a> <a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps</a>&lt; BPP &gt;::offset</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fixed offset for all operation of <a class="el" href="class_nano_canvas_ops.html">NanoCanvasOps</a> in pixels. </p>

<p class="definition">Definition at line <a class="el" href="adafruit_8h_source.html#l00075">75</a> of file <a class="el" href="adafruit_8h_source.html">adafruit.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>nano_engine/<a class="el" href="adafruit_8h_source.html">adafruit.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
